package cn.zhangxin.pethome.system.role.mapper;

import cn.zhangxin.pethome.system.role.domain.Role;
import cn.zhangxin.pethome.base.mapper.BaseMapper;
import cn.zhangxin.pethome.system.role.domain.RoleMenu;
import cn.zhangxin.pethome.system.role.domain.RolePermission;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author zx
 * @since 2023-02-02
 */
@Repository
public interface RoleMapper extends BaseMapper<Role> {
    //批量新增角色权限中间表
    void rolePermissionBatchInsert(List<RolePermission> rolePermissions);
    //批量新增角色菜单中间表
    void roleMenuBatchInsert(List<RoleMenu> roleMenus);
    //根据roleId删除角色权限中间表的数据
    void deletePermissionByRoleId(Long roleId);
    //根据roleId删除角色菜单中间表的数据
    void deleteMenuByRoleId(Long roleId);
}
